package task3;

public abstract class Animal {
	private String animal;
	private String name;
	private int age;

	Animal (String animal, String name, int age){
		setAnimal(animal);
		setName(name);
		setAge(age);
	}
	
	public String getAnimal() {
		return animal;
	}

	public void setAnimal(String animal) {
		if (animal != null && animal.length() >= 0)
			this.animal = animal;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		if (name != null && name.length() >= 0)
			this.name = name;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		if (age >= 0)
			this.age = age;
	}

	public void walk(){
		System.out.println("Animal walks");
	}
}
